//
//  FourMovieCell.m
//  BeautyClother
//
//  Created by dllo on 15/10/6.
//  Copyright (c) 2015年 宋爽. All rights reserved.
//

#import "FourMovieCell.h"

@implementation FourMovieCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.image1 = [[UIImageView alloc] init];
        [self.contentView addSubview:_image1];
        [_image1 release];
        
        self.title1 = [[UILabel alloc] init];
        [self.contentView addSubview:_title1];
        [_title1 release];
        
        self.image2 = [[UIImageView alloc] init];
        [self.contentView addSubview:_image2];
        [_image2 release];
        
        self.title2 = [[UILabel alloc] init];
        [self.contentView addSubview:_title2];
        [_title2 release];
    }
    return self;
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    
    CGFloat offheight = [UIScreen mainScreen].bounds.size.height / 667;
    
//    CGFloat offwidth = [UIScreen mainScreen].bounds.size.width / 375;
    
    self.image1.frame = CGRectMake(5, 5, (self.contentView.frame.size.width - 20) / 2, self.contentView.frame.size.height - 60);
    
    self.title1.frame = CGRectMake(5, self.image1.frame.size.height + 10 * offheight, (self.contentView.frame.size.width - 20) / 2, 40 * offheight);
    
    self.image2.frame = CGRectMake(self.image1.frame.size.width + 15, 5, (self.contentView.frame.size.width - 20) / 2, self.contentView.frame.size.height - 60);
    
    self.title2.frame = CGRectMake(self.image1.frame.size.width + 15, self.image2.frame.size.height + 10 * offheight, (self.contentView.frame.size.width - 20) / 2, 40 * offheight);
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
